package com.ice.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ice.common.Md5Util;
import com.ice.dao.AdminDao;
import com.ice.po.AdminPo;
import com.ice.service.AdminService;

@Service("AdminService")
public class AdminServiceImpl implements AdminService{

	@Autowired
	private AdminDao adminDao;
	
	@Override
	public AdminPo login(String username, String password) {
		// TODO Auto-generated method stub
		Map<String, Object> map = new HashMap<String, Object>();
		
		//加密密码
		map.put("username",username);
		map.put("password",  Md5Util.md5(password));
		return adminDao.findOne(map);
	}
	

}
